﻿@model cloudscribe.Core.IdentityServerIntegration.Models.NewApiSecretViewModel
@using cloudscribe.Core.IdentityServerIntegration
@inject IStringLocalizer<CloudscribeIds4Resources> sr
<form class="form-inline" asp-controller="ApiResource" asp-action="AddApiSecret">
    <div class="mb-3">
        <label class="form-label" asp-for="Value">@sr["Value"]</label>
        <input class="form-control" asp-for="Value">
        <span asp-validation-for="Value" class="invalid-feedback"></span>
    </div>
    <div class="mb-3">
        <label class="form-label" asp-for="Description">@sr["Description"]</label>
        <input class="form-control" asp-for="Description" />
    </div>
    <div class="mb-3">
        <label class="form-label" asp-for="Type">@sr["Type"]</label>
        <select asp-for="Type" name="Type" class="form-control">
            <option value="">@sr["Unspecified"]</option>
            <option value="SharedSecret">@sr["SharedSecret"]</option>
            <option value="X509Thumbprint">@sr["X509Thumbprint"]</option>
            <option value="X509Name">@sr["X509Name"]</option>
            <option value="X509CertificateBase64">@sr["X509CertificateBase64"]</option>
        </select>
    </div>
    <div class="mb-3">
        <label class="form-label" asp-for="Expiration">@sr["Expiration"]</label>
        <input class="form-control" asp-for="Expiration" />
    </div>
    <div class="mb-3">
        <select asp-for="HashOption" name="HashOption" class="form-control">
            <option value="">@sr["Don't Hash"]</option>
            <option value="sha256">@sr["Apply Sha256 Hash"]</option>
            <option value="sha512">@sr["Apply Sha512 Hash"]</option>
        </select>
    </div>
    <input asp-for="SiteId" type="hidden" />
    <input asp-for="ApiName" type="hidden" />
    <button type="submit" class="btn btn-primary">@sr["Add Secret"]</button>
    @*<div asp-validation-summary="All" class="text-danger"></div>*@
</form>
